<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="/common/common_tag.jsp"%>
<%@include file="/common/common_js.jsp"%>
<script type="text/javascript">
$(function(){
	initEasyUIStyle();
})
function btn_save (){
	var flag = $('#teacherForm').form('validate');
	if(flag){
		$.ajax({
   			url: "teacher_addTeacher.do",
   			type: "post",
   			data: $("#teacherForm").serialize(),
   			datatype:"json",
   			success: function(data){
		    	if(data.MSG=="success"){
		    		$.messager.alert('提示','数据已保存!','info');
		    		document.getElementById("teacherForm").reset();
   			    }else{
   			    	$.messager.alert('提示','数据保存失败!','error');
	   			}
		  	}
		});
   	}
}
function btn_rest(){
	document.getElementById("teacherForm").reset()
}
</script>
<body>
	<form id="teacherForm" method="post">
	<div class="pageFormContent" >	
		<fieldset>
			<legend>基础信息</legend>
			<div style="float: left;width: 750">
			<dl>
				<dt>姓名：</dt>
				<dd><input name="teacher.name" type="text" class="required" minlength="2" maxlength="10"/></dd>
			</dl>
			<dl>
				<dt>性别：</dt>
				<dd style="width: 150">
					<select class="combox" name="teacher.sex">
						<option value="0" selected="selected">女</option>
						<option value="1">男</option>
						
					</select>
				</dd>
			</dl>
			<dl>
				<dt>出生日期：</dt>
				<dd>
					<input name="teacher.birthday" type="text" class="easyui-datebox"
									validType="date"  required="true"/>
				</dd>
			</dl>
			
			<dl>
				<dt>工作年限：</dt>
				<dd>
					<input type="text" class="required digits"   min="0" max="40" name="teacher.workYear" />
				</dd>
			</dl>
			
			<dl>
				<dt>证件类型：</dt>
				<dd>
					<input type="text"  name="teacher.credentialsType" value="身份证" readonly="readonly"/>
				</dd>
			</dl>
			
			<dl>
				<dt>证件号：</dt>
				<dd>
					<input type="text" class="idcard " name="teacher.credentialsNO" class="required" />
				</dd>
			</dl>
			
			<dl>
				<dt>居住地：</dt>
				<dd>
					<input type="text" class="required" name="teacher.nowAddress" />
				</dd>
			</dl>
			<dl>
				<dt>Email：</dt>
				<dd>
					<input type="text"  class="email" name="teacher.email" />
				</dd>
			</dl>
			<dl>
				<dt>手机号码：</dt>
				<dd>
					<input type="text" class="required phone" name="teacher.cellPhone" />
				</dd>
			</dl>
			<dl>
				<dt>家庭电话：</dt>
				<dd>
					<input type="text" class="required phone" name="teacher.familyPhone" />
				</dd>
			</dl>
			<dl>
				<dt>职位：</dt>
				<dd>
					<select class="combox" name="teacher.office"  class="required " >
						<option value="2">普通教师</option>
						<option value="1">班主任</option>
						<option value="3">助教</option>
						<option value="4">保育员</option>
						<option value="5">财务</option>
						<option value="6">后勤</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>身高(cm)：</dt>
				<dd>
					<input type="text" name="teacher.height" class="digits"  min="100" max="250" />
				</dd>
			</dl>
			<dl>
				<dt>婚姻状况：</dt>
				<dd>
					<select class="combox" name="teacher.marriage" >
						<option value="0">已婚</option>
						<option value="1">未婚</option>
					</select>
				</dd>
			</dl>
			<dl>
				<dt>民族：</dt>
				<dd>
				<select class="combox" name="teacher.nation" >
					<option value="0" selected="selected">汉族</option>
					<option value="1">其他</option>
				</select>
				</dd>
			</dl>
			</div>
			<div style="background-color:#CCCCCC;width: 150;height: 150;float: left;border: 1px solid #000000;">
			照片
			</div>
		</fieldset>
		
		<fieldset>
			<legend>教育情况</legend>
			<dl>
				<dt>学历：</dt>
				<dd>
				<select class="combox" name="teacher.degress" >
					<option value="1">中专</option>
					<option value="2">大专</option>
					<option value="3">本科</option>
					<option value="4">研究生</option>
				</select>
				</dd>
			</dl>
			<dl>
				<dt>专业：</dt>
				<dd>
					<input name="teacher.major" type="text" />
				</dd>
			</dl>
			<dl>
				<dt>毕业学校：</dt>
				<dd>
					<input name="teacher.school" type="text" />
				</dd>
			</dl>
			
			<dl>
				<dt>资格证书：</dt>
				<dd><input name="teacher.certificate" type="text"  /></dd>
			</dl>
			
			<dl>
				<dt>外语能力：</dt>
				<dd><input name="teacher.language" type="text"   /></dd>
			</dl>
			
			<dl>
				<dt>特长：</dt>
				<dd><input name="teacher.strongSuit" type="text"/></dd>
			</dl>
			<dl>
				<dt>兴趣爱好：</dt>
				<dd><input name="teacher.interest" type="text"/></dd>
			</dl>
		</fieldset>
		</div>
		<div class="formBar">
				<ul>
					<li>
						<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-save"
							id="btn_save" onclick="btn_save()">提交</a>
							
					</li>
					<li>
						<a href="javascript:void(0)" class="easyui-linkbutton" iconCls="icon-cancel"
							id="btn_cancel" onclick="btn_rest()">重置</a>
					</li>
				</ul>
			</div>
	</form>
</body>